package com.dhh.util.calorie;

import com.dhh.vo.Goal;

public class CalUtil {
	public static int convertCal(int cal){
		int aCal = cal;
		int tCal = aCal / 100;
		if(tCal%2 == 0){
			tCal = tCal * 100;
		}else{
			tCal = (tCal+1)*100;
		}
		
		return tCal;
	}
	
	public static int getCal(Goal goal){
		int cal = BMRUtil.getCalorie(Double.valueOf(goal.getWeight()),goal.getHeight(), Integer.valueOf(goal.getAge()), goal.getGender(), goal.getActivityLevel());
		cal += 500*Integer.parseInt(goal.getWayGain());
		return cal;
	}
}
